package com.dmxh.api;

import com.dmxh.pojo.TbUser;
import com.dmxh.result.Result;
import com.dmxh.vo.AddressVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("dongdongshop-user-service")
public interface UserAPI {
    @PostMapping("/user/queryByName")
    public TbUser queryByName(@RequestBody String username);

    @GetMapping("/user/queryUserById/{id}")
    public TbUser queryUserById(@PathVariable("id") long id);

    @GetMapping("/address/queryAddressById/{id}")
    public Result<AddressVo> queryAddressById(@PathVariable("id") long id);
}
